﻿using EasyAdmin.Application.Contracts.Systems.Menus.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyAdmin.Application.Contracts.Systems.Menus
{
    public interface IMenuAppService
    {
        /// <summary>
        /// 创建菜单
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task CreateMenu(CreateUpdateMenuInput input);

        /// <summary>
        /// 创建菜单
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateMenu(CreateUpdateMenuInput input);

        /// <summary>
        /// 创建菜单操作按钮
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task CreateMenuOperation(CreateUpdateMenuOperation input);

        /// <summary>
        /// 更新菜单操作按钮
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateMenuOperation(CreateUpdateMenuOperation input);

        /// <summary>
        /// 根据菜单ID删除菜单信息
        /// </summary>
        /// <param name="menuId"></param>
        /// <returns></returns>
        Task DeleteMenu(long menuId);

        /// <summary>
        /// 根据操作按钮唯一标识删除按钮信息 
        /// </summary>
        /// <param name="menuOperationId"></param>
        /// <returns></returns>
        Task DeleteMenuOperation(long menuOperationId);

        /// <summary>
        /// 根据菜单Id获得菜单信息
        /// </summary>
        /// <param name="menuId"></param>
        /// <returns></returns>
        Task<MenuOutput> GetMenuByMenuId(long menuId);

        /// <summary>
        /// 获得所有菜单（树型结构）
        /// </summary>
        /// <returns></returns>
        Task<List<MenuOutput>> GetAllMenus();

        /// <summary>
        /// 获得菜单的按钮列表
        /// </summary>
        /// <param name="menuId"></param>
        /// <returns></returns>
        Task<IEnumerable<MenuOperationOutput>> GetMenuOperations(long menuId);

        /// <summary>
        /// 角色绑定菜单
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task RoleBindMenu(RoleBindMenuInput input);

        /// <summary>
        /// 获得角色绑定的菜单信息
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        Task<List<RoleMenuOutput>> GetRoleMenus(long roleId);

        /// <summary>
        /// 获得角色菜单  
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<List<UserMenuOutput>> GetUserMenusByUserId(long userId);       
    }
}
